package com.wanwu.channel.dao.inter;

import com.wanwu.channel.dao.condition.BaseCondition;
import com.wanwu.channel.dao.entity.ChannelClearEntity;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ChannelClearDao {

    int insert(ChannelClearEntity record);

    int insertSelective(ChannelClearEntity record);

    ChannelClearEntity selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ChannelClearEntity record);

    int updateByPrimaryKey(ChannelClearEntity record);

    ChannelClearEntity selectByChannelNo(@Param("channelNo") String channelNo);

    ChannelClearEntity selectByClearNo(@Param("clearNo") String channelNo);


    ChannelClearEntity selectByClearNoAndClearType(@Param("clearNo") String clearNo, @Param("clearDirectionType") Integer clearDirectionType);

    ChannelClearEntity selectByClearNoAndClearTypeFMaster(@Param("clearNo") String clearNo, @Param("clearDirectionType") Integer clearDirectionType);

    List<ChannelClearEntity> selectByCTimeAndStatus(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("statusList") List<Integer> statusList,@Param("tradeType") Integer tradeType);

    // 以下是后台的方法
    Integer countNum(@Param("entity") ChannelClearEntity entity, @Param("cond") BaseCondition condition);

    List<ChannelClearEntity> qryList(@Param("entity") ChannelClearEntity entity, @Param("cond") BaseCondition condition);

    List<ChannelClearEntity> qryClearListByChannelNo(@Param("chanelNoList") List<String> chanelNoList);

    ChannelClearEntity selectByChannelNoFMaster(String channelNo);

    List<ChannelClearEntity> qryListByTime(@Param("id") Long id,
                                           @Param("startDate") Date startDate,
                                           @Param("endDate") Date endDate,
                                           @Param("clearStatus") List<Integer> clearStatus,
                                           @Param("thirdStatus") List<String> thirdStatus,
                                           @Param("start") Long start,
                                           @Param("count") Long count);
}